package beanstao.util.type.base;

import beanstao.util.Util;
import beanstao.util.exception.technical.util.reflect.FailToCastObjectException;
import beanstao.util.type.Castor;

public class String2Boolean extends Castor<String, Boolean>
{

	@Override
	public Boolean cast(String src, Class<?> toType, String... args) throws FailToCastObjectException
	{
		if (src.length() == 0)
		{
			return false;
		}
		return Util.parseBoolean(src);
	}

}
